package com.example.demo.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * Created by wen.gao on 2018/5/6.
 * 从某个.properties加载配置
 */
@Configuration
@ConfigurationProperties("smtp")
@PropertySource("classpath:smtp.properties")
public class SMTPConfig {
    private String IP;

    private int port;

    public SMTPConfig() {

    }

    public SMTPConfig(String IP, int port) {
        this.IP = IP;
        this.port = port;
    }

    public String getIP() {
        return IP;
    }

    public void setIP(String IP) {
        this.IP = IP;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }
}
